<script setup>
import { provide, ref } from "vue";
import son from './components/provide-inject/son.vue'

const count = ref(1)
// 夸层传递数据
provide('appCount', count)
const changeCount = ()=>{
  count.value++
}
</script>
<template>
<div>
  <son></son>
  <h1>{{count}}</h1>
  <button @click="changeCount">点击修改count</button>
</div>
</template>
<style scoped>
</style>